<?php
require("../class/connect.php");
include("../class/config.php");
include("../class/db_sql.php");
include("../class/q_functions.php");
include("../class/class.php");
$link=db_connect();
$empire=new mysqlquery();
define('WapPage','show');
include("wapfun.php");
$classid=(int)$_GET['classid'];
$id=(int)$_GET['id'];
if(!$classid||!$class_r[$classid]['tbname']||!$id)
{
	DoWapShowMsg('您来自的链接不存在','index.php?style=$wapstyle');
}
$cpage=(int)$_GET['cpage'];
$cid=(int)$_GET['cid'];
$bclassid=(int)$_GET['bclassid'];
if(empty($cid))
{
	$cid=$classid;
}
$listurl="list.php?style=".$wapstyle."&amp;page=".$cpage."&amp;classid=".$cid."&amp;bclassid=".$bclassid;
$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$classid]['tbname']." where id='$id' and classid='$classid' and checked=1 limit 1");
if(!$r['id'])
{
	DoWapShowMsg('您来自的链接不存在',$listurl);
}
if($r['groupid'])
{
	DoWapShowMsg('此信息不能查看',$listurl);
}
//系统模型
$modid=$class_r[$classid][modid];
$ret_r=ReturnAddF($modid,1);

$pagetitle=DoWapClearHtml($r['title']);
//内容
if($r['newstext'])
{
	//存放文本
	if(strstr($public_r['savetxtf'],",".$class_r[$classid][tbname].".newstext,"))
	{
		$r[newstext]=GetTxtFieldText($r[newstext]);
	}
	//替换掉分页符
	$r[newstext]=str_replace("[!--empirenews.page--]","",$r[newstext]);
	$r[newstext]=str_replace("[/!--empirenews.page--]","",$r[newstext]);
}
include('template/'.$usewapstyle.'/show.temp.php');
db_close();
$empire=null;
?>